﻿using Firefly.Framework.Windows.ContentReaders;
using Firefly.Framework.Windows.Forms;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;

namespace Firefly.ContentPipeline.Windows.Forms
{
    [ContentTypeWriter]
    public class MemoContentWriter : ContentTypeWriter<Memo>
    {

        protected override void Write(ContentWriter output, Memo value)
        {
            WriteMemo(output, value);
        }

        public override string GetRuntimeReader(TargetPlatform targetPlatform)
        {
            return typeof(MemoContentReader).AssemblyQualifiedName;
        }

        internal void WriteMemo(ContentWriter output, Memo value)
        {
            ControlContentWriter.WriteComponent(output, value);
        }
    }
}
